/*
day66_3
2019.11.2
*/

#include<iostream>
#include<vector>
using namespace std;

class Node {
public:
    int val;
    vector<Node*> children;

    Node() {}

    Node(int _val, vector<Node*> _children) {
        val = _val;
        children = _children;
    }
};

class Solution {
public:
	void postorder(Node *root,vector<int> &vec)
	{
		if(!root) return ;
		
		for(Node *cur : root->children)
		{
			postorder(cur,vec);
		}
		vec.push_back(root->val);
	}
	
    vector<int> postorder(Node* root) {
    	vector<int> vec;
    	
        postorder(root,vec);
        
        return vec;
    }
};


int main()
{
	return 0;
}
